package com.novel.frame.wxl;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridBagLayout;
import java.awt.Toolkit;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.WindowConstants;
import javax.swing.border.TitledBorder;



public class WelfareFrame extends JFrame{
	private JScrollPane sp_center;//总滚动面板
	private JPanel pl_ALL;//总面板
	private JPanel pl_center;//中部面板
	private JLabel lb_Welfare_one;//存稿奖励
	private JLabel lb_Welfare_two;
	private JLabel lb_Welfare_three;
	private JLabel lb_Welfare_four;
	private JLabel lb_Welfare_five;
	private JLabel lb_Welfare_six;
	private JLabel lb_Welfare_seven;
	private JLabel lb_Welfare_eight;
	private JLabel lb_Welfare_nine;
	private JLabel lb_Welfare_ten;
	
	
	private JPanel pl_left;//左边面板
	private JLabel lb_left_img;//左边背景图片
	private JPanel pl_right;//右边面板
	private JLabel lb_right_backgroundimage;
	private JPanel pl_south;//南部面板
	private JPanel pl_north;//上部图片
	
	private JLabel lb_north_image;//上部图片
	
	private int ScreenWidth;
	private int ScreenHeight;
	public WelfareFrame() {
		//设置总布局
		JFrame jf=new JFrame("书海小说网");
		jf.setLayout(new BorderLayout());
		jf.setIconImage(Toolkit.getDefaultToolkit().createImage(WelfareFrame.class.getResource("./img/主题.jpg")));
		
		// 获取屏幕分辨率
		Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
		ScreenWidth = dimension.width;
		ScreenHeight = dimension.height;
		
		//界面总面板
		pl_ALL = new JPanel();
		pl_ALL.setLayout(new BorderLayout());
		pl_ALL.setPreferredSize(new Dimension(1500, 8400));
		
		//滑动总面板
		sp_center=new JScrollPane();
		sp_center.getViewport().add(pl_ALL);
		sp_center.getVerticalScrollBar().setUnitIncrement(30);  
		jf.add(sp_center);
		
		
		//上部总面板
		pl_north=new JPanel();
		pl_north.setLayout(new BorderLayout());
		pl_north.setPreferredSize(new Dimension(0, (int)(ScreenHeight*0.62 	)));
		pl_north.setBackground(Color.white);
		pl_north.setBorder(new TitledBorder(""));
		pl_ALL.add(BorderLayout.NORTH,pl_north);
		
		lb_north_image = new JLabel();
		lb_north_image.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/福利页面上部图片.png")));
		pl_north.add(lb_north_image);
		
		//中部面板
		pl_center = new JPanel();
		pl_center.setPreferredSize(new Dimension(1500, 1800));
		pl_center.setBorder(new TitledBorder(""));
		pl_ALL.add(BorderLayout.CENTER,pl_center);
		
		lb_Welfare_one = new JLabel();
		lb_Welfare_one.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/存稿有奖图片.png")));
		pl_center.add(lb_Welfare_one);
		
		lb_Welfare_two = new JLabel();
		lb_Welfare_two.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/激情分成签约.png")));
		pl_center.add(lb_Welfare_two);
		
		lb_Welfare_three = new JLabel();
		lb_Welfare_three.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/精品买断.png")));
		pl_center.add(lb_Welfare_three);
		
		lb_Welfare_four = new JLabel();
		lb_Welfare_four.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/保底分成.png")));
		pl_center.add(lb_Welfare_four);
		
		lb_Welfare_five = new JLabel();
		lb_Welfare_five.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/全勤奖.png")));
		pl_center.add(lb_Welfare_five);
		
		lb_Welfare_six = new JLabel();
		lb_Welfare_six.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/预签.png")));
		pl_center.add(lb_Welfare_six);
		
		lb_Welfare_seven = new JLabel();
		lb_Welfare_seven.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/封神榜奖励.png")));
		pl_center.add(lb_Welfare_seven);
		
		lb_Welfare_eight = new JLabel();
		lb_Welfare_eight.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/完本奖励.png")));
		pl_center.add(lb_Welfare_eight);
		
		lb_Welfare_nine = new JLabel();
		lb_Welfare_nine.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/精修奖励.png")));
		pl_center.add(lb_Welfare_nine);
		
		lb_Welfare_ten = new JLabel();
		lb_Welfare_ten.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/编辑联系方式.png")));
		pl_center.add(lb_Welfare_ten);
		
		
		
		//左边面版
		pl_left = new JPanel();
//		pl_left.setl
//		pl_left.setBackground(Color.GREEN);
		pl_left.setPreferredSize(new Dimension(300, 0));
		pl_left.setBorder(new TitledBorder(""));
		pl_ALL.add(BorderLayout.WEST,pl_left);
		
		lb_left_img = new JLabel();
		lb_left_img.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/福利背景图片.png")));
		pl_left.add(lb_left_img);
		//右边面板
		
		pl_right = new JPanel();
		pl_right.setPreferredSize(new Dimension(400, 0));
		pl_right.setBorder(new TitledBorder(""));
		pl_ALL.add(BorderLayout.EAST,pl_right);
		
		lb_right_backgroundimage = new JLabel();
		lb_right_backgroundimage.setIcon(new ImageIcon(WelfareFrame.class.getResource("./img/福利背景图片.png")));
		pl_right.add(lb_right_backgroundimage);
		
		
		
		
		//===================================================================================
		jf.setSize(ScreenWidth,ScreenHeight);//设置大小
		jf.setVisible(true);//设置可见
		jf.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);//设置可关闭
		jf.setLocationRelativeTo(null);//居中
		
		
	}
	
	
	public static void main(String[] args) {
		new WelfareFrame();
	}

}
